import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/pages/Index'
import Item1 from '@/pages/Item1'
import columnManager from '@/pages/columnManager/list.vue'
import addColumn from '@/pages/columnManager/add.vue'
import updateColumn from '@/pages/columnManager/update.vue'
import contentManager from '@/pages/contentManager/list.vue'

import templateManager from '@/pages/templateManager/list.vue'
import preView from '@/pages/templateManager/preView.vue'
import addTemplate from '@/pages/templateManager/add.vue'
import updateTemplate from '@/pages/templateManager/update.vue'

import addContent from '@/pages/contentManager/add.vue'
import updateContent from '@/pages/contentManager/update.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/ui/index.html',
      name: 'Index',
      component: Index
    },
    {
      path: '/ui/item1',
      name: 'Item1',
      component: Item1
    },
    {
      // 配置路由，当路径为'/columnManager',使用组件columnManager
      path:'/ui/columnManager',
      name: 'columnManager',
      component:columnManager
    },
    {
      // 配置路由，当路径为'/columnManager',使用组件columnManager
      path:'/ui/addColumn',
      name: 'addColumn',
      component:addColumn
    },
    { path:'/ui/updateColumn',
      name: 'updateColumn',
      component:updateColumn
    },
    {
      // 配置路由，当路径为'/columnManager',使用组件columnManager
      path:'/ui/templateManager',
      name: 'templateManager',
      component:templateManager
    },
    {
      path:'/ui/addTemplate',
      name: 'addTemplate',
      component:addTemplate
    },
    {
      path:'/ui/preView',
      name: 'preView',
      component:preView
    },
    { path:'/ui/updateTemplate',
      name: 'updateTemplate',
      component:updateTemplate
    },
    { path:'/ui/contentManager',
      name: 'contentManager',
      component:contentManager
    },
    { path:'/ui/addContent',
      name: 'addContent',
      component:addContent
    },
    { path:'/ui/updateContent',
      name: 'updateContent',
      component:updateContent
    }
  ]
})
